<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
    </h:head>
    <h:body>
        <ui:composition template="/WEB-INF/facelets/teacher_template.xhtml">
            <ui:define name="content"> 
                <h:form id="theForm">
                    <ui:repeat var="course" value="#{teacherGradesBackingBean.courses}">
                        <h:outputText value="Course: #{course.courseName}" />
                        <p:dataTable id="gradesTable" value="#{course.students}" var="student">  
                            <p:column sortBy="#{student.user.fname}">  
                                <f:facet name="header">  
                                    <h:outputText value="Student Name" />  
                                </f:facet>  
                                <h:outputText value="#{student.user.fname}" />  
                            </p:column> 
                        </p:dataTable>
                    </ui:repeat>
                </h:form>
            </ui:define> 
        </ui:composition>
    </h:body>
</html> 